/**
 * @file NmCdd.h
 * @brief NmCdd header file
 * @details NmCdd header file
 * @version 1.0
 * @date 2024-08-06
 * @author CZ
 */
#ifndef NMCDD_H
#define NMCDD_H

#include "Com.h"
#include "ComM_Cfg.h"
#include "Nm_Cfg.h"
#include "Rte_ComM_Type.h"

#define NM_CYCLETIME_TIMEOUT 110

typedef enum {
    NM_TIMEOUT = 0x00,
    NM_NORAML,
} eNMState;

typedef enum {
    PWRCONDITION_NOT = 0x00,
    PWRCONDITION_MET,
} ePWRConditionState;

typedef struct NMConditionState_s {
    ePWRConditionState prePowerState;
    ePWRConditionState curPowerState;
    eNMState           preNMState;
    eNMState           curNMState;
} sNMConditionState;

extern void NmStateChangeIndCallback_NmGlobalFeatures(const NetworkHandleType nmNetworkHandle, const Nm_StateType nmPreviousState, const Nm_StateType nmCurrentState);
extern void NmRepeatMessageIndCallback_NmGlobalFeatures(const NetworkHandleType nmNetworkHandle);
extern void NmPduReceiveIndCallback_NmGlobalFeatures(const uint8 nmNetworkHandle);

#endif